package com.wlstock.funi.ui;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.ListView;

import com.em.baselistener.OnBackListener;
import com.em.baselistener.OnMoreListener;
import com.em.widget.view.SelectPopUpWindow.onPopViewListener;
import com.wlstock.funi.R;
import com.wlstock.funi.adapter.TradeHisAdapter;
import com.wlstock.funi.dao.TradeHisDao;
import com.wlstock.funi.model.TradeHisModel;

/**
 * 机器人交易记录
 * @author admin
 *
 */
public class TradeHisActivity extends FundBaseActivity implements OnMoreListener, OnBackListener, onPopViewListener {
	
	private List<TradeHisModel> hisDatas;
	private TradeHisAdapter tradeHisAdapter;
	private ListView lv_trade_his;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_selffund_set);
		findViewById(R.id.layout_top_edit).setVisibility(View.GONE);
		setTitle(getString(R.string.title_trade_his));
		showMoreBtn(this);
		onBackClick(this);
		
		lv_trade_his = (ListView) findViewById(R.id.lv_self_fund_set);
		hisDatas = TradeHisDao.getInstance(this).queryHisDatasOrderbyDate();
		tradeHisAdapter = new TradeHisAdapter(this, hisDatas, R.layout.list_item_trade_his);
		lv_trade_his.setAdapter(tradeHisAdapter);
		
	}

	@Override
	public void onMoreClick(View v) {
		showPopUpView(getMenuList(), this);
	}

	private List<Map<String, Object>> getMenuList() {
		List<Map<String, Object>> menu = new ArrayList<Map<String,Object>>();
		return menu;
	}

	@Override
	public void onBackClick(View v) {
		this.finish();
	}

	@Override
	public void onViewSelectListener(String str) {
		
	}
	
	
	
	
}
